package com.chinasofti.java8.demo07;

public class ReflectDemo01 {

    public static void main(String[] args) throws ClassNotFoundException {
        //forName全类名
        Class clazz = Class.forName("com.chinasofti.java8.demo07.Student");
        System.out.println("clazz = " + clazz);
        //2. .class
        Class clazz1= Student.class;
        System.out.println("clazz1 = " + clazz1);

        //3. getClass
        Student s =new Student();
        Class clazz2 = s.getClass();
        System.out.println("clazz2 = " + clazz2);

        System.out.println(clazz==clazz1);
        System.out.println(clazz1==clazz2);
    }
}
